home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / programming / oracle7 7.2 / OCI72 / OCIDFN.H < prev    next >
Encoding:
C/C++ Source or Header  |  1995-05-18  |  5.2 KB  |  132 lines

  1. /*
  2.  * $Header: ocidfn.h 7020200.1 95/02/15 21:23:59 cli Generic<base> $ 
  3.  */
  4.  
  5. /* Copyright (c) 1991 by Oracle Corporation */
  6. /*
  7.    NAME
  8.      ocidfn.h - OCI Definations
  9.    NOTES
  10.      Shipped to users.
  11.    MODIFIED   (MM/DD/YY)
  12.     dchatter   02/08/95 -  olog call modes
  13.     jfbrown    02/03/95 -  remove non-printable characters
  14.     lchidamb   10/04/94 -  added field chk to cda_head, cda_def
  15.     dchatter   07/05/94 -  SQLT_CUR added
  16.     rkooi2     11/27/92 -  Changing e* datatypes to s* 
  17.     rkooi2     10/26/92 -  More portability mods 
  18.     rkooi2     10/22/92 -  Added #ifndef ORATYPES ... 
  19.     rkooi2     10/18/92 -  Changes to make it portable. 
  20.     sjain      03/16/92 -  Creation 
  21. */
  22.  
  23. /*
  24.  *  ocidfn.h
  25.  *
  26.  *  Common header file for OCI C sample programs.
  27.  *  This header declares the cursor and logon data area structure.
  28.  *  The types used are defined in <oratypes.h>.
  29.  *
  30.  */
  31.  
  32. #ifndef OCIDFN
  33. #define OCIDFN
  34.  
  35. #include <oratypes.h>
  36.  
  37. /* The cda_head struct is strictly PRIVATE.  It is used
  38.    internally only. Do not use this struct in OCI programs. */
  39.  
  40. struct cda_head {
  41.     sb2          v2_rc;
  42.     ub2          ft;
  43.     ub4          rpc;
  44.     ub2          peo;
  45.     ub1          fc;
  46.     ub1          rcs1;
  47.     ub2          rc;
  48.     ub1          wrn;
  49.     ub1          rcs2;
  50.     sword        rcs3;
  51.     struct {
  52.         struct {
  53.            ub4    rcs4;
  54.            ub2    rcs5;
  55.            ub1    rcs6;
  56.         } rd;
  57.         ub4    rcs7;
  58.         ub2    rcs8;
  59.     } rid;
  60.     sword        ose;
  61.     ub1         chk;
  62.     dvoid        *rcsp;
  63. };
  64.  
  65. /* the real CDA, padded to 64 bytes in size */
  66. struct cda_def {
  67.     sb2          v2_rc;                                    /* V2 return code */
  68.     ub2          ft;                                    /* SQL function type */
  69.     ub4          rpc;                                /* rows processed count */
  70.     ub2          peo;                                  /* parse error offset */
  71.     ub1          fc;                                    /* OCI function code */
  72.     ub1          rcs1;                                        /* filler area */
  73.     ub2          rc;                                       /* V7 return code */
  74.     ub1          wrn;                                       /* warning flags */
  75.     ub1          rcs2;                                           /* reserved */
  76.     sword        rcs3;                                           /* reserved */
  77.     struct {                                              /* rowid structure */
  78.         struct {
  79.            ub4    rcs4;
  80.            ub2    rcs5;
  81.            ub1    rcs6;
  82.         } rd;
  83.         ub4    rcs7;
  84.         ub2    rcs8;
  85.     } rid;
  86.     sword        ose;                                 /* OSD dependent error */
  87.     ub1         chk;
  88.     dvoid        *rcsp;                          /* pointer to reserved area */
  89.     ub1          rcs9[64 - sizeof (struct cda_head)];        /* filler to 64 */
  90. };
  91.  
  92. typedef struct cda_def Cda_Def;
  93.  
  94. /* the logon data area (LDA)
  95.    is the same shape as the CDA */
  96. typedef struct cda_def Lda_Def;
  97.  
  98. /* OCI Logon Modes for olog call */
  99. #define OCI_LM_DEF 0                                        /* default login */
  100. #define OCI_LM_NBL 1                                   /* non-blocking logon */
  101.  
  102. /* input data types */
  103. #define SQLT_CHR  1                        /* (ORANET TYPE) character string */
  104. #define SQLT_NUM  2                          /* (ORANET TYPE) oracle numeric */
  105. #define SQLT_INT  3                                 /* (ORANET TYPE) integer */
  106. #define SQLT_FLT  4                   /* (ORANET TYPE) Floating point number */
  107. #define SQLT_STR  5                                /* zero terminated string */
  108. #define SQLT_VNU  6                        /* NUM with preceding length byte */
  109. #define SQLT_PDN  7                  /* (ORANET TYPE) Packed Decimal Numeric */
  110. #define SQLT_LNG  8                                                  /* long */
  111. #define SQLT_VCS  9                             /* Variable character string */
  112. #define SQLT_NON  10                      /* Null/empty PCC Descriptor entry */
  113. #define SQLT_RID  11                                                /* rowid */
  114. #define SQLT_DAT  12                                /* date in oracle format */
  115. #define SQLT_VBI  15                                 /* binary in VCS format */
  116. #define SQLT_BIN  23                                  /* binary data(DTYBIN) */
  117. #define SQLT_LBI  24                                          /* long binary */
  118. #define SQLT_UIN  68                                     /* unsigned integer */
  119. #define SQLT_SLS  91                        /* Display sign leading separate */
  120. #define SQLT_LVC  94                                  /* Longer longs (char) */
  121. #define SQLT_LVB  95                                  /* Longer long binary */ 
  122. #define SQLT_AFC  96                                      /* Ansi fixed char */
  123. #define SQLT_AVC  97                                        /* Ansi Var char */
  124. #define SQLT_CUR  102                                        /* cursor  type */
  125. #define SQLT_LAB  105                                          /* label type */
  126. #define SQLT_OSL  106                                        /* oslabel type */
  127.  
  128.  
  129. #endif  /* OCIDFN */
  130.  
  131.  
  132.